home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / util / wb / DosMan121.lha / man / FailAt < prev    next >
Text File  |  1995-05-05  |  2KB  |  49 lines

  1.  
  2.  
  3.  
  4.            Failat(V1.3 in C:) (2.x, 3.x internal)
  5.  
  6.  
  7.  
  8.      NAME
  9.             Failat - To set a fail level for a batch file.
  10.  
  11.      SYNOPSIS
  12.             Failat RCLim
  13.  
  14.      DESCRIPTION
  15.             When using Execute to run scripts, any command that 
  16.         returns an error greater than the current value of the 
  17.         Fail level will cause the shell to abort the script with 
  18.         an error message.  You can use Failat to increase or 
  19.         decrease this level to whatever you need.  The shell will 
  20.         reset the Fail level (usually 5, 10, 20 but can be any 
  21.         number) at the end of every script execution, so scripts 
  22.         always start out in a known state.
  23.  
  24.             Under 2.x/3.x the result code is stored int the 
  25.         environment variable RC, which is represented by $rc. The 
  26.         bigger the return code, the bigger the error. If the 
  27.         severity of the error is higher than the number you set 
  28.         then the script stops running.
  29.  
  30.             Once your FAILAT has been run in the script, the 
  31.         FAILAT level returns to 10.
  32.  
  33.             You can use FAILAT to a very high number and test the 
  34.         return codes that any of your IF statements return.
  35.             
  36.         
  37.      EXAMPLE
  38.             1. To temporarily set the failure level to 30
  39.  
  40.           Failat 30 
  41.  
  42.           This now makes it possible to execute commands that return
  43.           error codes greater than 20, which would ordinarily cause
  44.           Execute to stop with an error message.
  45.  
  46.             2. To display the current failure level threshold.
  47.  
  48.           Failat
  49.